<div style="min-height: 5px;"></div>
<ol class="breadcrumb">
    <li class="breadcrumb-item">
        <a href="{:urlBuild('!.menu')}">
            <i class="{$setting.icon}" aria-hidden="true"></i>
            {$setting.descrip}
        </a>
    </li>
    <li class="breadcrumb-item active">数据新增</li>
</ol>
<form method="post" action="{:url('menu/save')}">
    <p class="lead text-info">概要数据</p>
    <div class="card">
        <div class="card-body">
            <div class="form-group row">
                <label for="ipt_group_mk" class="col-sm-2 col-form-label">分组码</label>
                <div class="col-sm-10">
                    <input type="text" name="group_mk" value="{$data.group_mk|default=''}" class="form-control" id="ipt_group_mk" placeholder="分组码" required>
                </div>
            </div>
            <div class="form-group row">
                <label for="ipt_module" class="col-sm-2 col-form-label">模块代码</label>
                <div class="col-sm-10">
                    <input type="text" name="module" value="{$data.module|default=''}" class="form-control" id="ipt_module" placeholder="模块代码" required>
                </div>
            </div>
            <div class="form-group row">
                <label for="ipt_group_desc" class="col-sm-2 col-form-label">分组描述</label>
                <div class="col-sm-10">
                    <input type="text" name="group_desc" value="{$data.group_desc|default=''}" class="form-control" id="ipt_group_desc" placeholder="分组描述" required>
                </div>
            </div>
        </div>
    </div>
    <p class="lead text-warning">明细数据</p>
    <table class="table table-bordered js__form">
        <thead>
        <tr class="bg-info"><th>顺序</th><th>代码</th><th>描述</th><th>地址</th><th>图标</th><th>备注</th><th>可访问角色</th></tr>
        </thead>
        <tbody>
            {if condition="isset($detail)"}
                {$detail}
            {else}
            <tr><td data-no="1">1</td>
                <td><input type="text" name="descrip" class="form-control"></td>
                <td><input type="text" name="url" class="form-control"></td>
                <td>
                    <div class="input-group">
                        <span class="input-group-addon"></span>
                        <input type="text" name="icon" class="form-control">
                    </div>
                </td>
                <td><input type="text" name="remark" class="form-control"></td>
                <td><input type="text" name="access_role" class="form-control"></td>
            </tr>
            {/if}
        </tbody>
    </table>
    <p class="text-right">
        <button class="btn btn-info btn-sm" id="row_add_btn" type="button">
            <i class="fa fa-plus"></i> 新增列
        </button>
        <button class="btn btn-warning btn-sm" id="row_del_btn" type="button">
            <i class="fa fa-minus"></i> 删除列
        </button>
    </p>
    <p class="text-center">
        <button class="btn btn-success" id="rows_save_btn" type="submit">
            <i class="fa fa-save"></i> 保存数据
        </button>
    </p>
</form>